package com.tmt.fileservice;

import com.tmt.fileservice.exception.FileLoadException;
import com.tmt.fileservice.exception.FileValidateException;

import java.io.OutputStream;

/**
 * Created by ThreeManTeam on 2017/5/24.
 */
public interface IFileStorage {

    void setFileCache(IFileCache fileCache);

    void save(String filePath, IFileDataResolver resolver, String validatorName) throws FileValidateException;

    void load(String filePath, OutputStream out) throws FileLoadException;

    long load(String filePath, long startPos, byte[] data) throws FileLoadException;

    void delete(String filePath);

    long getFileSize(String filePath);

}
